package objects;

public class OBUentry {
    private Integer id;
    private Double latitude;
	private Double longitude;
	private Integer speed;
	private boolean seatBelt;

	public OBUentry() {
    	id=0;
		latitude=0.0;
		longitude=0.0;
		speed=0;
		seatBelt = false;
	}

    public OBUentry(Integer newid) {
        id=newid;
        latitude=0.0;
        longitude=0.0;
        speed=0;
        seatBelt = false;
    }

	public void setID(Integer newid) {
		id = newid;
	}

	public void setLat(Double latnew) {
		latitude= latnew;
	}

    public void setLong(Double longnew) {
        longitude= longnew;
    }

    public void setSpeed(Integer speednew) {
        speed=speednew;
    }

    public void setSeatBelt(boolean seatBeltNew) {
        seatBelt = seatBeltNew;
    }
	
	public Integer getID() {
		return id;
	}
	
	public Double getLat() {
		return latitude;
	}

	public Double getLong() {
		return longitude;
	}

	public Integer getSpeed() {
		return speed;
	}

	public boolean getSeatBelt() {
		return seatBelt;
	}

	public void display() {
        System.out.println("OBUentry ID " + id);
        System.out.println("Lat: " + latitude);
        System.out.println("Long: " + longitude);
        System.out.println("Speed: " + speed);
		if (seatBelt) {
			System.out.println("Seat Belt: Engaged");
		} else {
			System.out.println("Seat Belt: Not Engaged");
		}
	}
}
